#include "PrimaryGeneratorAction.hh"
#include "DetectorConstruction.hh"

#include <geant4/G4Event.hh>
#include <geant4/G4GeneralParticleSource.hh>
#include <geant4/G4ParticleTable.hh>
#include <geant4/G4ParticleDefinition.hh>
#include <math.h>


PrimaryGeneratorAction::PrimaryGeneratorAction(DetectorConstruction* myDC)
  : myDetector(myDC)
{
  particleSource = new G4GeneralParticleSource;
}


PrimaryGeneratorAction::~PrimaryGeneratorAction()
{
  delete particleSource;
}


G4GeneralParticleSource * PrimaryGeneratorAction::getSource() const
{
  return particleSource;
}

void PrimaryGeneratorAction::GeneratePrimaries(G4Event* anEvent)
{
  particleSource->GeneratePrimaryVertex(anEvent);
}


